import request from '@/utils/request'

// 查询视频列表
export function listVideos(query) {
  return request({
    url: '/api/videos/list',
    method: 'get',
    params: query
  })
}

//api/videos/mini/agentSale
export function agentSale(query) {
  return request({
    url: '/api/videos/mini/agentSale',
    method: 'get',
    params: query
  })
}


// /api/videos/mini/sale

export function sale(data) {
  return request({
    url: '/api/videos/mini/sale',
    method: 'get',
    params: data
  })
}


// 查询视频详细
export function getVideos(id) {
  return request({
    url: '/api/videos/' + id,
    method: 'get'
  })
}

// 新增视频
export function addVideos(data) {
  return request({
    url: '/api/videos',
    method: 'post',
    data: data
  })
}

// 修改视频
export function updateVideos(data) {
  return request({
    url: '/api/videos',
    method: 'put',
    data: data
  })
}

// 删除视频
export function delVideos(id) {
  return request({
    url: '/api/videos/removeVideo/' + id,
    method: 'delete'
  })
}
// /api/videos/removeOrder/{ids}

export function delVideos1(id) {
  return request({
    url: '/api/videos/removeOrder/' + id,
    method: 'delete'
  })
}
